package assignments

import scala.collection._

/**
 * A project task that takes a function and returns the result as an option
 * @author Jacob Biggs
 * @param id  Task id (maintain result ordering)
 * @param fn  Function to execute
 */
case class ProjectTask (id : Int, func : () => Any) extends Task {
  
  /**
   * Runs the given function specified in the task
   * @return An option containing the value
   */
  def run() : Option[Any] = Some( func() )

    
}

case class ProjectResult (taskId: Int,
                          value: Option[Any] )